from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# Uncomment the next two lines to enable the admin:
from django.conf import settings
from django.contrib import admin
admin.autodiscover()

from tastypie.api import Api
from m.api import ShotResource,VideoResource

v1_api = Api(api_name='v1')
v1_api.register(ShotResource())
v1_api.register(VideoResource())



urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'my.views.home', name='home'),
    # url(r'^my/', include('my.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^api/', include(v1_api.urls)),
    url(r'^v/(?P<videoid>\d*)/$', 'm.views.video'),
    url(r'^va/(?P<videoid>\d*)/$', 'm.views.video_api'),

#    url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
#    { 'document_root': 'c:/t/my/static', 'show_indexes':True }),
#    url(r'(?P<path>.*)$', 'django.views.static.serve',
#    { 'document_root': 'c:/t/my/player', 'show_indexes':True }),
)

#urlpatterns += staticfiles_urlpatterns()

